package com.hui.dto;

import com.hui.constant.MC;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Pattern;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.time.LocalDateTime;

@Schema(description = "资产申请新增DTO")
@Data
@NoArgsConstructor
@AllArgsConstructor
public class AssetsBorrowUpdateDTO implements Serializable {
    @Schema(description = "资产申请主键")
    @NotNull(message = "资产申请主键不能为空")
    private Long id;

    @Schema(description = "资产ID")
    private Long fkAssetsId;

    @Schema(description = "员工ID")
    private Long fkEmpId;

    @Schema(description = "申请数量")
    @Min(value = 1, message = "申请数量不能小于1")
    private Integer count;

    @Schema(description = "申请时间")
    private LocalDateTime borrowTime;

    @Schema(description = "预计归还时间")
    private LocalDateTime expectedReturnTime;

    @Schema(description = "实际归还时间")
    private LocalDateTime returnTime;

    @Schema(description = "申请描述")
    @Pattern(regexp = MC.Regex.INFO_RE, message = MC.Regex.INFO_RE_MSG)
    private String info;
}
